//
//  PingLunCellTableViewCell.m
//  XiangMu
//
//  Created by 康世标 on 15/8/28.
//  Copyright (c) 2015年 康世标. All rights reserved.
//

#import "PingLunCellTableViewCell.h"

@implementation PingLunCellTableViewCell

- (void)awakeFromNib {
    // Initialization code
    [self.hedImagView.layer setMasksToBounds:YES];
    [self.hedImagView.layer setCornerRadius:25];

}
- (void)PingLunDic:(NSMutableArray *)arr{
    
    [self.hedImagView sd_setImageWithURL:[NSURL URLWithString:[arr valueForKey:@"headImg"]==[NSNull null]?@"":[arr valueForKey:@"headImg"]] placeholderImage:[UIImage imageNamed:@"like"]];
    self.lable1.text = [arr valueForKey:@"nickname"]==[NSNull null]?@"":[arr valueForKey:@"nickname"];
    self.lable2.text = [self setTime:[[arr valueForKey:@"created"] doubleValue]];
    
    self.lable3.text = [arr valueForKey:@"content"]==[NSNull null]?@"":[arr valueForKey:@"content"];

}
- (NSString *)setTime:(double)time{
    
    NSDate * date = [NSDate dateWithTimeIntervalSince1970:time/1000];
    
    NSDateFormatter * forma = [[NSDateFormatter alloc]init];
    
    [forma setDateFormat:@"yyyy年MM月dd日 HH:mm:ss"];
    
    NSString * string = [forma stringFromDate:date];
    
    return string;
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
